//
//  SYBaiBanCuXiViewController.m
//  SanYiTeaching
//
//  Created by 郑浩然 on 2019/12/30.
//  Copyright © 2019年 SanYi. All rights reserved.
//

#import "SYBaiBanCuXiViewController.h"

@interface SYBaiBanCuXiViewController ()
@property (weak, nonatomic) IBOutlet UILabel *thirtySixLab;//36号字
@property (weak, nonatomic) IBOutlet UILabel *eighteenLab;//18号字
@property (weak, nonatomic) IBOutlet UILabel *nineLab;

@property (strong, nonatomic) UILabel *contLab;

@end

@implementation SYBaiBanCuXiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    _contLab = _nineLab;
    
    [self contLabBoardWidth];
    
}
- (IBAction)selectBtnClick:(UIButton *)sender {
    [self relasContBoarWidth];
    NSInteger tag = sender.tag - 550;
    if (tag == 0) {
        _contLab = _nineLab;
    } else if (tag == 1) {
        _contLab = _eighteenLab;
    } else {
        _contLab = _thirtySixLab;
    }
    
    [self contLabBoardWidth];
    
    if (self.block) {
        self.block(tag);
    }
    
    if ([self.delegate respondsToSelector:@selector(selectCuXiType:)]) {
        [self.delegate selectCuXiType:tag];
    }
}

- (void)relasContBoarWidth {
    self.contLab.layer.borderWidth = 0;
}

- (void)contLabBoardWidth {
    self.contLab.layer.borderWidth = 2;
    self.contLab.layer.borderColor = [UIColor colorWithHexString:@"#20b097"].CGColor;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
